I am working on fixing a script that scans a project and gets each module's last modified date and user and puts them in an excel spreadsheet. The issue is that in 9.1 it'll crash after a certain amount of time (this time doesn't vary much), where in 8.3 the script doesn't have an issue. I've tried adding pragma runLim, 0 and it hasn't helped. Any suggestions would be helpful
|
Re: Script crashes DOORS in 9.1, but not in 8.3 My guts tell the issue doesn't come from your script, but from the scanned data: How do you access the "Last Modified On" attribute? If it is from "Module", it means while opening modules you fire triggers, DXL attribute computing and perhaps Layout DXL. If it is from "ModuleProperties" or "Module", you still fire module-level DXL attribute computing. In any case, can you tell for sure your migrated modules are clean? Another theory would be a memory leak. Use of "ModuleProperties" seems to have such an issue, but as its behaviour differs from a version to another I can't confirm it with DOORS 9.1 myself. – Éric |
Re: Script crashes DOORS in 9.1, but not in 8.3 ePiallat - Thu Feb 26 04:34:32 EST 2009 for itm in current Project do { progressStep ++cnt if (progressCancelled) { if (confirm("Halt Progress?")) { progressStop CleanUp halt } } if (type(itm) == "Project") { csvfile << "Project," name(itm) ",,,\n" } if (type(itm) == "Folder") { csvfile << "Folder," name(itm) ",,,\n" } if (type(itm) == "Formal") { modN = fullName(itm) m = read(modN, false) if (m != null) { lastModOn = m."Last Modified On" lastModBy = m."Last Modified By" if (existsUser(lastModBy)) { u = find(lastModBy) uName = u.fullName if (uName == null) { uName = lastModBy } } else { uName = "Unknown User" } csvfile << "Formal Module," name(itm) "," lastModOn "," uName ",\n" } else { csvfile << "ERROR!, Formal Module, Could Not, Be Opened,\n" cantopen++ } } else { //No Output } } I'm not sure what you mean by migrated modules being clean. Also, how can I check if triggers are causing this issue? |
Re: Script crashes DOORS in 9.1, but not in 8.3 SystemAdmin - Fri Feb 27 10:18:31 EST 2009 m = read(modN, false) I've also added a close(m) after the attribute information was gathered, and it did not fix the issue. Why is this read causing the script to fail even if I'm closing the modules afterwards? Also, is there a way to get attribute information without doing this read? |
Re: Script crashes DOORS in 9.1, but not in 8.3 SystemAdmin - Fri Feb 27 10:51:33 EST 2009 (Does your log file always end at the same line?) In this case, try to just open the presummably faulty module (last listed in log file). You will then be able to list every embedded DXL with: Trigger t; for t in current Module do print (name of t) ":\\n" (dxl of t) "\\n==========================================\\n" AttrDef ad; for ad in current Module do if (ad.dxl) print (ad.name) ":\\n" (string ad.dxl) "\\n==========================================\\n" |
Re: Script crashes DOORS in 9.1, but not in 8.3 SystemAdmin - Fri Feb 27 10:51:33 EST 2009 modN = fullName(itm) m = read(modN, false) if (m != null) { lastModOn = m."Last Modified On" lastModBy = m."Last Modified By" /* by: */ modN = fullName(itm) ModuleProperties mp getProperties (moduleVersion module modN, mp) if (mp != null) { lastModOn = probeRichAttr_ (mp,"Last Modified On", false) lastModBy = probeRichAttr_ (mp,"Last Modified By", false) /* – Éric */ |
Re: Script crashes DOORS in 9.1, but not in 8.3 |